<include file="Public:header"/>

<div class="roadbar">
    <div class="container"><strong>权限配置</strong></div>
</div>

<div class="main">
    <div class="container">

        <form action="{:U('Group/powerup','gid='.$val['map_id'])}" method="post">
            <table class="table table-bordered">
                <thead>
                    <tr>
                        <th>{$val.map_name}-权限节点</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>
                            <ul class="main-table-ul">
                                <volist name="node" id="v">
                                    <li class="form-group">
                                        <div class="checkbox">
                                            <label>
                                                <input type="checkbox" name="val[]" value="{$v.mod_id}">{$v.mod_name}
                                            </label>
                                        </div>
                                    </li>
                                </volist>
                                <div style="clear:both;"></div>
                            </ul>
                        </td>
                    </tr>
                    <tr>
                        <td><button type="submit" class="btn btn-primary">更新</button></td>
                    </tr>
                </tbody>
            </table>
        </form>

    </div>
</div>

<script>
    var valString = "{$val.map_value}";
    var valArray = valString.split(",");
    for (var i = 0; i < valArray.length; i++) {
        $("input[type=checkbox][value=" + valArray[i] + "]").attr("checked", true);
    }
</script>

<include file="Public:footer"/>
